package com.example.librarymanagement.dto.borrowrecord;

import com.example.librarymanagement.entity.BorrowRecord;
import com.example.librarymanagement.util.BaseDto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * @author LQS
 */
@EqualsAndHashCode(callSuper = true)
@Data
@Accessors(chain = true)
public class BorrowRecordDto extends BaseDto<BorrowRecord> {

    @ApiModelProperty(value = "图书id")
    @NotNull(message = "图书ISSN码或ISBN码不能为空")
    private Integer bookId;

    @ApiModelProperty(value = "期数")
    private String issue;

    @ApiModelProperty(value = "操作对象（0为图书借阅，1为期刊借阅）")
    @NotNull(message = "操作对象不能为空")
    private Integer bookPeriodical;
}
